<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui">
	<ui:composition template="/templates/padrao.xhtml">
		<ui:define name="barraTitulo">Cadastro de Advogado</ui:define>
		<ui:define name="conteudo">
			<h:form id="form">
				<p:growl id="messages" />
				<p:tabView id="divTabView">
					<p:tab title="Cadastro">
						<h:panelGrid columns="2" columnClasses="width150 alinhaDir, width500">

							<h:column >
							</h:column>
							<h:column >
							</h:column>
							
							<h:column >
								<h:outputText value="N&ordm; OAB:" styleClass=""/>
							</h:column>
							<h:column >
								<h:inputText  value="#{controleAdvogado.advogado.numeroOAB}" size="10" maxlength="10"/>
							</h:column>

							<h:column >
								<h:outputText value="Nome:" styleClass=""/>
							</h:column>
							<h:column >
								<h:inputText  value="#{controleAdvogado.advogado.pessoa.nome}" size="100" maxlength="150"/>
							</h:column>
							
							<h:column >
								<h:outputText value="email:" styleClass=""/>
							</h:column>
							<h:column >
								<h:inputText  value="#{controleAdvogado.advogado.pessoa.email}" size="70" maxlength="100"/>
							</h:column>

							<h:column >
								<h:outputText value="Endereco:" styleClass=""/>
							</h:column>
							<h:column >
								<h:inputText  value="#{controleAdvogado.advogado.pessoa.endereco.logradouro}" size="70" maxlength="100"/>
								
								<h:outputText value="Numero:" styleClass=""/>&nbsp;
								<h:inputText  value="#{controleAdvogado.advogado.pessoa.endereco.numero}" size="8" maxlength="10"/>
								
							</h:column>

							<h:column >
								<h:outputText value="Complemento" styleClass=""/>
							</h:column>
							<h:column >
								<h:inputText  value="#{controleAdvogado.advogado.pessoa.endereco.complemento}" size="70" maxlength="50"/>
							</h:column>

							
							<h:column >
								<h:outputText value="Bairro:" styleClass=""/>
							</h:column>
							<h:column >
								<h:inputText  value="#{controleAdvogado.advogado.pessoa.endereco.bairro}" size="25" maxlength="100"/>
								
								<h:outputText value="Cidade:" styleClass=""/>&nbsp;
								<h:inputText  value="#{controleAdvogado.advogado.pessoa.endereco.cidade}" size="24" maxlength="100"/>
							</h:column>
							
							<h:column >
								<h:outputText value="Telefone:" styleClass=""/>
							</h:column>
							<h:column >
								<p:inputMask value="#{controleAdvogado.advogado.pessoa.telefone}" mask="(99)9999-9999" size="20" maxlength="20" />
								<h:outputText value="Celular:" styleClass=""/>&nbsp;
								<p:inputMask value="#{controleAdvogado.advogado.pessoa.celular}" mask="(99)9999-9999" size="20" maxlength="20" />
								&nbsp;
								
								
								<h:outputText value="CEP:" styleClass=""/>&nbsp;
								<p:inputMask value="#{controleAdvogado.advogado.pessoa.endereco.CEP}" mask="99999-999" size="9" maxlength="9" />

								<h:outputText value="UF:" styleClass=""/>&nbsp;
								<h:selectOneMenu value="#{controleAdvogado.advogado.pessoa.endereco.estado}">  
				                    <f:selectItems value="#{controleAdvogado.UFS}" var="UF" itemLabel="#{UF}" itemValue="#{UF}" />
								</h:selectOneMenu>
								
								
							</h:column>							
							
						</h:panelGrid>
					</p:tab>
				</p:tabView>
				<h:outputLink value="manutencao.jsf">
					<h:graphicImage url="/images/botoes/btnPesquisar.png" class="btnAcoes"/>
				</h:outputLink>
				<h:commandLink action="#{controleAdvogado.gravar}" styleClass="alinhaDir">
					<h:graphicImage url="/images/botoes/btnGravar.png" class="btnAcoes"/>
				</h:commandLink>
			</h:form>
		</ui:define>
	</ui:composition>
</html>